package com.zhongyouyun.other.exception;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class BizException  extends RuntimeException{

    public static final Boolean successState = true;
    private int code;
    private String msg;
    @ApiModelProperty(value = "数据状态")
    private Boolean success=successState;

    public Boolean getSuccess() {
        if (ObjectUtil.isEmpty(success)){
            return  true;
        }
        return success;
    }

}
